package com.lyj.service.impl;

import com.lyj.mapper.NurseManageMapper;
import com.lyj.pojo.Nurse;
import com.lyj.pojo.Vacation;
import com.lyj.service.NurseManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NurseManageServiceImpl implements NurseManageService {

    @Autowired
    NurseManageMapper nurseManageMapper;
//查询全部护工
    @Override
    public List<Nurse> queryAllNurse() {
        List<Nurse> nurseList = nurseManageMapper.queryAllNurse();

        return nurseList;
    }
//关键字搜索
    @Override
    public List<Nurse> queryNurseByName(String username) {
        List<Nurse> nurseList = nurseManageMapper.queryNurseByName(username);
        return nurseList;
    }


    @Override
    public Boolean addNurse(Nurse nurse) {
        Boolean aBoolean = nurseManageMapper.addNurse(nurse);
        return aBoolean;
    }

    @Override
    public Boolean delNurseById(int nurseId) {
        Boolean aBoolean = nurseManageMapper.delNurseById(nurseId);
        return aBoolean;

    }
}
